aHTMLSTR =  '<script type="text/javascript"><!--google_ad_client = "pub-1036318490403542"; google_ad_slot = "8464056649"; google_ad_width = 120; google_ad_height = 600;//--></script>';
aHTMLSTR += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>';
chat = ['risk game strategy ','gambling casino ', 'poker' , 'bored', 'strategy luck game', 'marketing', 'flash games', 'video games', 'ajax games', 'military strategy', 'military games', 'military war', 'war games'];
chatsrc = ['risk game strategy ','gambling casino ', 'poker' , 'bored', 'strategy luck game', 'marketing', 'flash games', 'video games', 'ajax games', 'military strategy', 'military games', 'military war', 'war games'];

time = 100000;

function setAHTML(slot,height,width) {
 height = height - 200;
 aHTMLSTR =  '<script type="text/javascript"><!--google_ad_client = "pub-1036318490403542"; google_ad_slot =';
 aHTMLSTR += slot;
 aHTMLSTR+= '; google_ad_width = '+width+'; google_ad_height = '+(height-10)+';//--></script>';
 aHTMLSTR += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>';
 document.getElementById("ads").style.height=(height)+'px';
}
function refresh_ahtml(divid) {
  try {
  window.frames[divid].document.innerHTML='';
  //document.getElementById(divid).contentDocument.style.innerHTML = '#000;';
  } catch (err) { return; }
  //chatinfo = MLTags(document.getElementById('chat').innerHTML);
 
  //window.frames[divid].document.innerHTML=aHTMLSTR+"<div style='left: 0px;'>"+chatinfo+"</div>";
  if (chat.length==0)  {
    chat.push(chatsrc[parseInt(chatsrc.length*Math.random())]);
    chat.push(chatsrc[parseInt(chatsrc.length*Math.random())]);
  }
  window.frames[divid].location = "ads.html?context="+chat.join();
  chat = [];
  //window.frames[divid].location.reload(true);
  //document.getElementById(divid).contentDocument.innerHTML=aHTMLSTR+"<div style='left: 0px;'>"+chatinfo+"</div>";
  //document.getElementById(divid).contentDocument.location.reload(true);
  timedRefresh(divid,time);
}


function timedRefresh(divid,time) {
	setTimeout("refresh_ahtml('"+divid+"');",time);
}

if (navigator.appVersion.indexOf("iPhone")!=-1) {
alert("HIDDEN IFRAME");
document.getElementById("adsdiv").className = "hidden";
document.getElementById("ads").className = "hidden";
} else
timedRefresh('ads',time);

function receivechatlog(tt) {
   if (tt==null) return;
   if (tt.replace(/<\/?[^>]+(>|$)/g, " ")!='undefined') {
   chat.push((tt.replace(/<\/?[^>]+(>|$)/g, " "))+" ");
   if (chat.length>50) chat.pop();
   }
}
//strInputCode.replace(/<\/?[^>]+(>|$)/g, "");

